Skip to content

Add option to gen sourcemaps for handler.mjs #824

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cozzbp
Copy link

@cozzbp cozzbp commented Jul 27, 2025

No description provided.

Copy link

changeset-bot bot commented Jul 27, 2025

🦋 Changeset detected

Latest commit: f1a97ce

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@opennextjs/cloudflare Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

pkg-pr-new bot commented Jul 27, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@opennextjs/cloudflare@824

commit: f1a97ce

@@ -81,6 +81,7 @@ export async function bundleServer(buildOpts: BuildOptions): Promise<void> {
minifySyntax: !debug,
legalComments: "none",
metafile: true,
sourcemap: getOpenNextConfig(buildOpts).cloudflare?.sourcemap,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be we can always generate the source maps.

The Next build dominates the build time so the build time should not change a lot

Suggested change
sourcemap: getOpenNextConfig(buildOpts).cloudflare?.sourcemap,
sourcemap: true,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just interested in figuring out a way to have server side sourcemaps for readable stack traces on cloudflare. Trying to figure out how to make this happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants